N=18; value=[|0,144908501,401314401,105953299,383479567,445152065,498557454,309747475,125351881,123163777,193759009,207019666,60481216,327379161,169178986,37882289,500011891,25061194| 144908501,0,96854191,334269,36974153,327870501,119680201,583627993,194278073,62332453,83548725,166783235,85274113,225727085,2669187,337357105,348074861,8377480| 401314401,96854191,0,204070197,370915315,5260111,75229,401985992,26085881,851222,2987417,438041226,96277861,221931097,455882393,21580873,94367155,39699641| 105953299,334269,204070197,0,108694537,33392426,273606347,52969043,118313713,9611721,538217576,740449,61809314,463360759,12431387,568527501,176163674,115477354| 383479567,36974153,370915315,108694537,0,3105761,632462578,16740214,221477903,388032081,129033727,64495321,34951,4524451,24305665,121384657,26478161,5250953| 445152065,327870501,5260111,33392426,3105761,0,294425921,127387297,780552416,14297767,408934321,75880015,8559957,45898403,17875982,7412152,73162955,111837697| 498557454,119680201,75229,273606347,632462578,294425921,0,129150697,159787765,392269489,8030315,80564485,87097105,351961345,515436763,148165711,18283261,203301491| 309747475,583627993,401985992,52969043,16740214,127387297,129150697,0,10968673,4671789,115899946,113632111,15704074,271975900,356009606,336519621,4172385,26257629| 125351881,194278073,26085881,118313713,221477903,780552416,159787765,10968673,0,500147621,362158813,222327105,410893426,49989213,238200946,173901331,230520481,55998529| 123163777,62332453,851222,9611721,388032081,14297767,392269489,4671789,500147621,0,108848440,389547181,2590659,88140889,233254656,45864481,57662353,180269365| 193759009,83548725,2987417,538217576,129033727,408934321,8030315,115899946,362158813,108848440,0,31371895,366339007,4906683,131783101,147389166,18792891,10194400| 207019666,166783235,438041226,740449,64495321,75880015,80564485,113632111,222327105,389547181,31371895,0,18226301,367374988,402470761,3064909,8035363,111663379| 60481216,85274113,96277861,61809314,34951,8559957,87097105,15704074,410893426,2590659,366339007,18226301,0,26960025,234308691,66366539,129297733,7116321| 327379161,225727085,221931097,463360759,4524451,45898403,351961345,271975900,49989213,88140889,4906683,367374988,26960025,0,79208501,18704134,302578121,191760827| 169178986,2669187,455882393,12431387,24305665,17875982,515436763,356009606,238200946,233254656,131783101,402470761,234308691,79208501,0,7984291,118535830,264675373| 37882289,337357105,21580873,568527501,121384657,7412152,148165711,336519621,173901331,45864481,147389166,3064909,66366539,18704134,7984291,0,105347009,20384151| 500011891,348074861,94367155,176163674,26478161,73162955,18283261,4172385,230520481,57662353,18792891,8035363,129297733,302578121,118535830,105347009,0,44088073| 25061194,8377480,39699641,115477354,5250953,111837697,203301491,26257629,55998529,180269365,10194400,111663379,7116321,191760827,264675373,20384151,44088073,0|];